<?php
use yii\helpers\Html;
use yii\helpers\Url;
/* @var $this yii\web\View */
$this->title = '项目详情';
?>
<section id="body_h">
<div class="modular4">
<img width="100%" src="<?= Yii::getAlias('@web') . '/' ?>images/projectdetails-top.jpg" alt="项目详情">
<div class="modular4-con">
<p class="modular4-con16">
<?php if ($infos['type']==0){?>
<span class="b-f small-div">抵</span>
<?php }?>
<?php if ($infos['type']==1){?>
<span class="b-f Greenbgcolor small-div">秒</span>
<?php }?>
<?php if ($infos['type']==2){?>
<span class="b-f Greenbgcolor small-div">其他</span>
<?php }?>
&nbsp;&nbsp;<?= $infos['name'];?>
</p>
<div class="modular4-con17">
<div class="circle">
<div class="pie_left"><div class="left"></div></div>
<div class="pie_right"><div class="right"></div></div>
<div class="mask Greencolor">
<p><span class="font-14"><?= (1-$infos['investable']/$infos['money'])*100;?>%</span><br>投资进度</p>

<p class="hide"><span class="NUM"><?= $infos['investable']/$infos['money']*100;?></span>%</p>
</div>
</div>
</div>
<p class="modular4-con18"><span><?= $infos['rate'];?>%</span>年利率</p>
<p class="modular4-con19">剩余：￥<?= number_format($infos['investable']);?>元</p>
<p class="modular4-con20">本期：￥<?= number_format($infos['money']/10000,2);?>万元</p>
<p class="modular4-con21"><img width="80%" src="<?= Yii::getAlias('@web') . '/' ?>images/Project-detailsheader.png" alt=""><span><?= $infos['reward'];?>%</span></p>
</div>
</div>
<ul class="modular8">
<li>
<p class="modular8-left">还款方式：</p>
<p class="modular8-right"><?php $repayType=$infos['repayType']; if($repayType==0){echo '其他';}elseif($repayType==1){echo '按天到期还款';}elseif($repayType==2){echo '按月分期还款';}elseif($repayType==3){echo '按季分期还款';}elseif($repayType==4){echo '每月还息到期还本';}?></p>
</li>
<li>
<p class="modular8-left">发布时间：</p>
<p class="modular8-right"><?= $infos['time'];?></p>
</li>
<li>
<p class="modular8-left">期限：</p>
<p class="modular8-right"><?= $infos['duration'];?>月</p>
</li>
<li>
<p class="modular8-left">借款用途：</p>
<p class="modular8-right"><?php $use=$infos['use']; if($use==1){echo '短期周转';}elseif($use==2){echo '生意周转';}elseif($use==3){echo '其他用途';}?></p>
</li>
<li>
<p class="modular8-left">剩余时间：</p>
<p class="modular8-right"><?= $infos['failTime'];?></p>
</li>
<li>
<p class="modular8-left">计息时间：</p>
<p class="modular8-right"><?= $infos['auditTime'];?></p>
</li>
</ul>
<p class="modular9 clearfix"><a href="<?= Url::to(['information','id'=>$infos['id']]);?>">产品资料<span>&gt;</span></a></p>
<div class="modular10">
<h2>产品信息</h2>
<p><?= $infos['description'];?></p>
</div>
<p class="mould-2bot"><a class="b-f" href="<?= Url::to(['invest/index']);?>">立即投资</a></p>
<div class="footer-h"></div>
</section>
<section id="footer">
		<ul class="footer-nav clearfix">
		    <li class="current-bot">
		        <a href="<?= Url::to('main');?>">
		            <img src="<?= Yii::getAlias('@web') . '/' ?>images/footer1-on.png" alt="">
		            首页
		        </a>
		    </li>
		    <li>
		        <a href="<?= Url::to('member');?>">
		            <img src="<?= Yii::getAlias('@web') . '/' ?>images/footer2.png" alt="">
		            我的账户
		        </a>
		    </li>
		    <li>
		        <a href="<?= Url::to(['company/about']);?>">
		            <img src="<?= Yii::getAlias('@web') . '/' ?>images/footer3.png" alt="">
		            关于我们
		        </a>
		    </li>
		</ul>
	</section>
<script src="<?= Yii::getAlias('@web') . '/' ?>js/reset.js"></script>
<script src="<?= Yii::getAlias('@web') . '/' ?>js/run.js"></script>
<script src="<?= Yii::getAlias('@web') . '/' ?>js/touchscroll.js"></script>
<script src="<?= Yii::getAlias('@web') . '/' ?>js/touchscroll.dev.js"></script>
<script>
	$(function($) {
	    var UA=window.navigator.userAgent;  //使用设备
	    var CLICK="click";
	    if(/ipad|iphone|android/.test(UA)){   //判断使用设备
	        CLICK="tap";
	    };
	    $('.circle').each(function(index, el) {
	        var num = $(this).find('.NUM').text() * 3.6;
	        if (num<=180) {
	            $(this).find('.right').css('transform', "rotate(" + num + "deg)");
	        } else {
	            $(this).find('.right').css('transform', "rotate(180deg)");
	            $(this).find('.left').css('transform', "rotate(" + (num - 180) + "deg)");
	        };
	    });
		$(".bodyA").hide();
	});
</script>